package com.ljtg.ljtgpojo.vo;

import com.ljtg.ljtgpojo.entity.CommodityDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommodityVO {
     @Schema(description = "主键ID", example = "1")
    private Long id;

    @Schema(description = "商品名称", example = "iPhone 13")
    private String name;

    @Schema(description = "分类ID", example = "1")
    private Long categoryId;

    @Schema(description = "销售时间", example = "2023-10-01")
    private LocalDate saleTime;

    @Schema(description = "时间ID", example = "1")
    private Long timeId;

    @Schema(description = "价格", example = "9999.99")
    private BigDecimal price;

    @Schema(description = "图片", example = "http://example.com/image.jpg")
    private String image;

    @Schema(description = "描述", example = "最新款iPhone")
    private String description;

    @Schema(description = "创建时间", example = "2023-10-01T12:00:00")
    private LocalDateTime createTime;

    @Schema(description = "更新时间", example = "2023-10-01T12:00:00")
    private LocalDateTime updateTime;

    @Schema(description = "创建人", example = "1")
    private Long createUser;

    @Schema(description = "更新人", example = "1")
    private Long updateUser;

    private List<CommodityDetail> flavors = new ArrayList<>();
}
